c###outmuf.for
      SUBROUTINE OUTMUF
C--------------------------------
C.....THIS ROUTINE TABULATES THE "MUFS" USING A VECTORED FORMAT SCHEME
C.....WHICH PRINTS A "DASH" IF "MUFS" .LE. ONE AND THE VALUE OTHERWISE
      COMMON / FILES / LUI, LUO, LU2, LU5, LU6, LU15, LU16, LU20, LU25,
     A LU26, LU35
      COMMON / ION / IHRE, IHRO, IHRS, LUFP, METHOD, NOISE, NPSL
      COMMON/MUFS/EMUF(24),F1MUF(24),F2MUF(24),ESMUF(24),ALLMUF(24)
     1,FOT(24),XLUF(24),HPF(24),ANGMUF(24),MODMUF,SIGL(4),SIGU(4),DELMU
     2F(4),HPMUF(4),HTMUF(4),FVMUF(4),AFMUF(4),NHOPMF(4),YFOT(4),YHPF(4)
     3 ,YMUF(4)
      COMMON / OUTLAB / LABEL(11), LAYTYP(5), IEAST, INORTH, ISOUTH,
     A IWEST, LABLI, LABLJ, LABLK
      CHARACTER IEAST*1, ISOUTH*1, INORTH*1, IWEST*1, LABEL*5, LAYTYP*2,
     A LABLI*5, LABLJ*5, LABLK*5
      COMMON / OUTPRT / LINBOT(26), LINBD(14), LINTOP(15), LINTP(14),
     A GRPTYP, JOUT, LINBYP, LINES, LINMAX, LINTYP, LPAGES, NLINE
      COMMON / TIME / IT, GMT, UTIME(24), GMTR, XLMT(24), ITIM, JTX
      DIMENSION XFMT(5)
      CHARACTER NFMT(4)*6, IFMT(14)*6, IGMT*6, ILMT*6
      DATA NFMT/',5X,  ', '2H-   ', ',F7.2 ', '      '/
      DATA IFMT(1)/'(1H , '/, IFMT(2)/'2X,   '/, IFMT(3)/'2F6.1 '/,
     A IFMT(14)/'     )'/, IGMT/'   GMT'/, ILMT/'   LMT'/
      LINES = 0
C.....CALL SUBROUTINE OUTTOP TO OUTPUT THE HEADER LINES
      CALL OUTTOP
C.....PRINT THE TABULATION HEADING
      IF(METHOD - 26) 130, 120, 130
  120 WRITE(LUO,901) IGMT, ILMT, LABEL(4), LABEL(7), LABEL(3),
     1 LABEL(10), LABEL(8)
       GO TO 135
  130 WRITE(LUO,902) IGMT, ILMT, LABEL(4), LABEL(7), LABEL(3), LABEL(10)
  135 CONTINUE
C.....BEGIN HOUR LOOP
      DO 400 JT = 1,24
C.....INCREMENT HOUR IF GMT . LT. 0
      IF(UTIME(JT)) 400, 140, 140
C.....INITIALIZE LINE TO PRINT DASHES (CHANGE LATER WHERE NEEDED)
  140 KOUNT = 0
      DO 150 J = 4, 12, 2
  150 IFMT(J) = NFMT(1)
      DO 160 J = 5, 13, 2
  160 IFMT(J) = NFMT(2)
C.....SET TO TABULATE FOT
      KOUNT = KOUNT + 1
      IFMT(4) = NFMT(3)
      IFMT(5) = NFMT(4)
      XFMT(KOUNT) = FOT(JT)
C.....SET TO TABULATE HPF
      KOUNT = KOUNT + 1
      IFMT(6) = NFMT(3)
      IFMT(7) = NFMT(4)
      XFMT(KOUNT) = HPF(JT)
C.....SET TO TABULATE ESMUF
      KOUNT = KOUNT + 1
      IFMT(8) = NFMT(3)
      IFMT(9) = NFMT(4)
      XFMT(KOUNT) = ESMUF(JT)
C.....SET TO TABULATE ALLMUF
      KOUNT = KOUNT + 1
      IFMT(10) = NFMT(3)
      IFMT(11) = NFMT(4)
      XFMT(KOUNT) = ALLMUF(JT)
C.....SET TO TABULATE LUFS (IF METHOD = 26)
      IF(METHOD - 26) 250, 260, 250
  250 IFMT(12) = NFMT(4)
      IFMT(13) = NFMT(4)
      GO TO 280
  260 CONTINUE
      KOUNT = KOUNT + 1
      IFMT(12) = NFMT(3)
      IFMT(13) = NFMT(4)
      XFMT(KOUNT) = XLUF(JT)
  280 CONTINUE
      WRITE(LUO,IFMT) UTIME(JT), XLMT(JT), (XFMT(K),K=1,KOUNT)
  400 CONTINUE
C.....END OF HOUR LOOP
      RETURN
  901 FORMAT(//,' ',2X,2A6,5(2X,A5),/)
  902 FORMAT(//,' ',2X,2A6,4(2X,A5),/)
      END
C--------------------------------
